package com.hanlink.dsp.bluetooth.ble;

import java.util.Objects;

public class BtDevice {
    private boolean isConnected;
    private String mac;
    private String name;

    public BtDevice() {
    }

    public BtDevice(String mac, String name) {
        this.mac = mac;
        this.name = name;
    }

    public String getMac() {
        return this.mac;
    }

    public String getName() {
        return this.name;
    }

    public boolean isConnected() {
        return this.isConnected;
    }

    public void setConnected(boolean paramBoolean) {
        this.isConnected = paramBoolean;
    }

    public void setMac(String paramString) {
        this.mac = paramString;
    }

    public void setName(String paramString) {
        this.name = paramString;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BtDevice btDevice = (BtDevice) o;
        return Objects.equals(mac, btDevice.mac);
    }

    @Override
    public int hashCode() {
        return Objects.hash(mac);
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("BtDevice{");
        sb.append("isConnected=").append(isConnected);
        sb.append(", mac='").append(mac).append('\'');
        sb.append(", name='").append(name).append('\'');
        sb.append('}').append(super.toString());
        return sb.toString();
    }
}
